package org.particlethink.model;


import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "materials")
public class Material {//物料
    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;
    private Date createdAt;
    private Date updatedAt;
    private String name;//名称
    private String specification;//规格
    private String typ;//型号
    private String no;
    private String categoryId;//分类
    private String categoryName;
    private String parentCategoryId;//物料大类
    private String parentCategoryName;

    private String allCategory;

    private String quality;//质量标准
    private String unit;//单位

    public Material() {
    }

    public Material(Integer id, Date createdAt, Date updatedAt, String name, String specification, String typ, String no, String categoryId, String parentCategoryId, String quality, String unit) {
        this.id = id;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.name = name;
        this.specification = specification;
        this.typ = typ;
        this.no = no;
        this.categoryId = categoryId;
        this.parentCategoryId = parentCategoryId;
        this.quality = quality;
        this.unit = unit;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getSpecification() {
        return specification;
    }

    public void setTyp(String typ) {
        this.typ = typ;
    }

    public String getTyp() {
        return typ;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryId() {
        return categoryId == null ? "" : categoryId;
    }

    public void setParentCategoryId(String parentCategoryId) {
        this.parentCategoryId = parentCategoryId;
    }

    public String getParentCategoryId() {
        return parentCategoryId == null ? "" : parentCategoryId;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getQuality() {
        return quality;
    }

    public void setQuality(String quality) {
        this.quality = quality;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getParentCategoryName() {
        return parentCategoryName;
    }

    public void setParentCategoryName(String parentCategoryName) {
        this.parentCategoryName = parentCategoryName;
    }


    public String getAllCategory() {
        return allCategory;
    }

    public void setAllCategory(String allCategory) {
        this.allCategory = allCategory;
    }
}
